Skip to content

feat: add AbstractCommand::callSilently()#10177

Open
paulbalandan wants to merge 1 commit into
codeigniter4:4.8from
paulbalandan:call-silent
Open

feat: add AbstractCommand::callSilently()#10177
paulbalandan wants to merge 1 commit into
codeigniter4:4.8from
paulbalandan:call-silent

Conversation

@paulbalandan
Copy link
Copy Markdown
Member

Description
Extracted from michalsn's review on #10174.

Adds AbstractCommand::callSilently($command, $arguments, $options, $noInteractionOverride = true) to invoke another modern command with its output discarded, so the parent can emit its own consolidated message.

Two small supporting pieces:

  • CodeIgniter\CLI\NullInputOutput — an InputOutput sink that discards writes and returns an empty string from input().
  • CLI::getInputOutput() (@internal) — getter symmetric to the existing setInputOutput() / resetInputOutput() pair.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@github-actions github-actions Bot added the 4.8 PRs that target the `4.8` branch. label May 9, 2026
Comment thread system/CLI/AbstractCommand.php
@paulbalandan paulbalandan force-pushed the call-silent branch 2 times, most recently from 2afd543 to 43a60f0 Compare May 11, 2026 17:21
Copy link
Copy Markdown
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.8 PRs that target the `4.8` branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants